package com.lg.happyfarmer.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.hemaapp.hm_FrameWork.HemaAdapter;
import com.lg.happyfarmer.R;
import com.lg.happyfarmer.bean.Bank;

import java.util.ArrayList;

/**
 * Created by Torres on 2018/4/25.
 */

public class SelectAdapter extends HemaAdapter {
    private ArrayList<Bank> lists = new ArrayList<>();
    private AdPagerAdapter adPagerAdapter;

    public SelectAdapter(Context mContext, ArrayList<Bank> lists) {
        super(mContext);
        this.lists = lists;
    }

    @Override
    public int getCount() {
        int count = lists == null ? 0 : lists.size();
        return count == 0 ? 1 : count;
    }

    @Override
    public Object getItem(int i) {
        return null;
    }

    @Override
    public long getItemId(int i) {
        return 0;
    }

    @Override
    public View getView(int i, View convertView, ViewGroup viewGroup) {
        if (lists.size() == 0)
            return getEmptyView(viewGroup);
         ViewHolder holder;
//        if (convertView == null) {
        convertView = LayoutInflater.from(mContext).inflate(
                R.layout.listitem_easyselect, null);
        holder = new  ViewHolder();
        findView(holder, convertView);
        convertView.setTag(R.id.TAG_VIEWHOLDER, holder);
//        } else
//            holder = (ViewHolder) convertView.getTag(R.id.TAG_VIEWHOLDER);
        setData(holder, i, convertView);
        return convertView;
    }

    private void setData( ViewHolder h, int position, View v) {
    }

    private void findView( ViewHolder h, View v) {

    }

    private class ViewHolder {
    }
}
